import axios from 'axios';
import {API_NEW_VERSION} from '../api';

export const searchArrivalReceiveLoadingList = params => {
  return axios.get(API_NEW_VERSION + `loading_lists/arrival/receive`, {params: params});
};

export const signIn = params => {
  return axios.get(API_NEW_VERSION + 'loading_lists/arrival/sign_in', {params: params});
};
/**
 * 根据路线ids获取装车单明细
 */
export const loadingListDetail = params => {
  return axios.get(API_NEW_VERSION + 'loading_lists/arrival/detail', {params: params});
};

// ------待卸车-----------
// --取消签到
export const cancelSignIn = params => {
  return axios.get(API_NEW_VERSION + 'loading_lists/arrival/cancel_sign_in', {params: params});
};

// --确认卸货
export const affirmUnload = (params) => {
  return axios.post(API_NEW_VERSION + 'loading_lists/arrival/affirm_unload', params);
};

// --取消卸货
export const cancelAffirmUnload = (params) => {
  return axios.post(API_NEW_VERSION + 'loading_lists/arrival/cancel_affirm_unload', params);
};

// ------已卸车-----------
// --取消卸车
export const returnToUnload = params => {
  return axios.get(API_NEW_VERSION + 'loading_lists/arrival/return_to_unload', {params: params});
};
